package strategy.improve;

import strategy.improve.Duck;

/**
 * @Author liangliangzhao
 * @data 2023/4/21 10:38
 */

public class ToyDuck extends Duck {
    public ToyDuck(String name){
        this.name = name;
        flyBehavior = new NoFlyBehavior();
    }
    @Override
    public void display() {
        System.out.println("玩具鸭");
    }

    @Override
    public void quack() {
        System.out.println("玩具鸭不能叫");
    }

    @Override
    public void swim() {
        System.out.println("玩具鸭不会游泳");
    }

}
